package com.yxh.base;

import com.yxh.service.WorkService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by WL on 2018/7/26.
 */

public class MyJob{
    private static final Logger logger = LoggerFactory.getLogger(MyJob.class);

    @Autowired
    private WorkService workService;
    //上面Task配置中   执行的方法
    public void work()
    {
        System.out.println("work begin----------");
        workService.oacleToMysql();
        System.out.println("work down----------");
    }
}